home *** CD-ROM | disk | FTP | other *** search
/ Greatest Childrens Stories Ever Told / Greatest_Stories.iso / movies / ripvan / shared.dir / 01008_Script_MAIN STARTHANDLER < prev    next >
Text File  |  1994-11-07  |  2KB  |  81 lines

  1. --update  10/12/94 ch2/tales no testing
  2. --Startmovie handler
  3.  
  4. on startmovie
  5.   GLOBAL NEXTMOVIE,theRECT
  6.   checktheMOVIE
  7.   --set theRECT=rect(the StageLeft+120,theStageTop+140,the StageLeft+408,the StageTop+218)
  8.   IF NEXTMOVIE>0 OR THE FRAME>10 THEN 
  9.     fixpuppets
  10.   else
  11.     setpuppets false
  12.   end if
  13.   
  14.   IF THE FRAME<3 THEN 
  15.     unloadcast
  16.     preloadcast 1,30
  17.   end if
  18.   
  19. end startmovie
  20.  
  21.  
  22.  
  23. ON ENTERFRAME
  24.   GLOBAL OK,QA,questions,returnframe
  25.   IF (THE FRAME< RETURNFRAME and questions=1) THEN SET QA=0
  26.   else if (RETURNFRAME>THE FRAME and questions=1) then set qa=1
  27. END
  28.  
  29. on checktheMOVIE
  30.   global returnframe,holdreturnframe,nextmovie,moviename,BACKMOVIE
  31.   if the movie contains "1" then 
  32.     changetheMovie "2","1"
  33.     if the frame>marker("1") then fixpuppets
  34.     exit
  35.   else 
  36.     if the movie contains "2" then
  37.       changetheMovie "3","1"
  38.       if the frame=1 and nextmovie=0 then set returnframe=0
  39.       if nextmovie=1 then set returnframe=holdreturnframe
  40.       if nextmovie=0 then set nextmovie=1
  41.       exit
  42.     else
  43.       if the movie contains "3" then
  44.         changetheMovie "4","2"
  45.         if the frame=1 and nextmovie=1 then set returnframe=0
  46.         if nextmovie=2 then set returnframe=holdreturnframe
  47.         if nextmovie=1 then set nextmovie=2
  48.         exit
  49.       else
  50.         if the movie contains "4" then
  51.           changetheMovie "5","3"
  52.           if the frame=1 and nextmovie=2 then set returnframe=0
  53.           if nextmovie=3 then set returnframe=holdreturnframe
  54.           if nextmovie=2 then set nextmovie=3
  55.           exit
  56.         end if
  57.       end if
  58.     end if
  59.   end if
  60.   
  61. end checktheMOVIE
  62.  
  63. on changetheMovie mov1, mov2
  64.   global moviename,BACKMOVIE
  65.   put offset(".",the movie) into offDIR
  66.   put chars(THE MOVIE,1,offDir-2) & mov1&".DIR" into moviename
  67.   PUT MOVIENAME
  68.   put chars(THE MOVIE,1,offDir-2) & mov2&".DIR" into backmovie
  69.   PUT backmovie
  70. end changetheMovie
  71.  
  72. on fixsprite state
  73.   repeat with buttons=19 to 21
  74.     set the type of sprite buttons to state
  75.   end repeat
  76.   set the type of sprite 20 to 1
  77.   set the type of sprite 24 to 1
  78. end fixsprite
  79.  
  80.  
  81.